package com.junit;

import org.junit.Test;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class test {
    @Test
    public void demo() throws UnsupportedEncodingException {
        String str = new String("项目".getBytes("UTF-8"));
        System.out.println(str);
        str= URLEncoder.encode(str,"GBK");//%CF%EE%C4%BF   %CF%EE%C4%BF
        System.out.println(str);
    }
}
